<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Hammerspoon docs: TimeMachineProgress</title>
    <style type="text/css">
      a { text-decoration: none; }
      a:hover { text-decoration: underline; }
      th { background-color: #DDDDDD; vertical-align: top; padding: 3px; }
      td { width: 100%; background-color: #EEEEEE; vertical-align: top; padding: 3px; }
      table { width: 100% ; border: 1px solid #0; text-align: left; }
      section > table table td { width: 0; }
    </style>
    <link rel="stylesheet" href="docs.css" type="text/css" media="screen" />
  </head>
  <body>
    <header>
      <h1><a href="./index.html">docs</a> &raquo; TimeMachineProgress</h1>
      <p>Show Time Machine backup progress in a menubar indicator.</p>
<p>If no backup is in progress, the indicator disappears. When a
backup is in preparation of in progress, the indicator is shown,
indicating current state/progress of the backup.</p>
<p>Download: <a href="https://github.com/Hammerspoon/Spoons/raw/master/Spoons/TimeMachineProgress.spoon.zip">https://github.com/Hammerspoon/Spoons/raw/master/Spoons/TimeMachineProgress.spoon.zip</a></p>

      </header>
      <h3>API Overview</h3>
      <ul>
        <li>Variables - Configurable values</li>
          <ul>
            <li><a href="#backupIcon">backupIcon</a></li>
            <li><a href="#logger">logger</a></li>
            <li><a href="#refresh_interval">refresh_interval</a></li>
          </ul>
        <li>Methods - API calls which can only be made on an object returned by a constructor</li>
          <ul>
            <li><a href="#refresh">refresh</a></li>
            <li><a href="#start">start</a></li>
            <li><a href="#stop">stop</a></li>
          </ul>
      </ul>
      <h3>API Documentation</h3>
        <h4 class="documentation-section">Variables</h4>
          <section id="backupIcon">
            <a name="//apple_ref/cpp/Variable/backupIcon" class="dashAnchor"></a>
            <h5><a href="#backupIcon">backupIcon</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>TimeMachineProgress.backupIcon</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Image to use for the menubar icon.</p>
</td>
              </tr>
              <tr>
                  <th>Notes</th>
                  <td><ul>
<li>Defaults to the default macOS Time Machine menubar icon stored in <code>/System/Library/CoreServices/Menu Extras/TimeMachine.menu/Contents/Resources/TMBackingUp.pdf</code>. If this fails, it defaults to the Time Machine application icon, obtained as <code>hs.image.imageFromAppBundle('com.apple.backup.launcher'):setSize({w=18,h=18})</code>.</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/TimeMachineProgress.spoon/init.lua#L31">Source/TimeMachineProgress.spoon/init.lua line 31</a></td>
              </tr>
            </table>
          </section>
          <section id="logger">
            <a name="//apple_ref/cpp/Variable/logger" class="dashAnchor"></a>
            <h5><a href="#logger">logger</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>TimeMachineProgress.logger</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.</p>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/TimeMachineProgress.spoon/init.lua#L21">Source/TimeMachineProgress.spoon/init.lua line 21</a></td>
              </tr>
            </table>
          </section>
          <section id="refresh_interval">
            <a name="//apple_ref/cpp/Variable/refresh_interval" class="dashAnchor"></a>
            <h5><a href="#refresh_interval">refresh_interval</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>TimeMachineProgress.refresh_interval</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Integer specifying how often the indicator should be refreshed. Defaults to 5 seconds.</p>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/TimeMachineProgress.spoon/init.lua#L26">Source/TimeMachineProgress.spoon/init.lua line 26</a></td>
              </tr>
            </table>
          </section>
        <h4 class="documentation-section">Methods</h4>
          <section id="refresh">
            <a name="//apple_ref/cpp/Method/refresh" class="dashAnchor"></a>
            <h5><a href="#refresh">refresh</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>TimeMachineProgress:refresh()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Update the indicator and menu according to the current backup status.</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td></td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/TimeMachineProgress.spoon/init.lua#L95">Source/TimeMachineProgress.spoon/init.lua line 95</a></td>
              </tr>
            </table>
          </section>
          <section id="start">
            <a name="//apple_ref/cpp/Method/start" class="dashAnchor"></a>
            <h5><a href="#start">start</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>TimeMachineProgress:start()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Starts the indicator</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The TimeMachineProgress object</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/TimeMachineProgress.spoon/init.lua#L207">Source/TimeMachineProgress.spoon/init.lua line 207</a></td>
              </tr>
            </table>
          </section>
          <section id="stop">
            <a name="//apple_ref/cpp/Method/stop" class="dashAnchor"></a>
            <h5><a href="#stop">stop</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>TimeMachineProgress:stop()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Stops the indicator</p>
</td>
              </tr>
              <tr>
                  <th>Parameters</th>
                  <td><ul>
<li>None</li>
</ul>
</td>
              </tr>
              <tr>
                  <th>Returns</th>
                  <td><ul>
<li>The TimeMachineProgress object</li>
</ul>
</td>
              </tr>
              <tr>
                <th>Source</th>
                <td><a href="https://github.com/Hammerspoon/Spoons/blob/master/Source/TimeMachineProgress.spoon/init.lua#L225">Source/TimeMachineProgress.spoon/init.lua line 225</a></td>
              </tr>
            </table>
          </section>
  </body>
</html>